# Maintainer: Balló György <ballogyor+arch at gmail dot com>

pkgname=fragments
pkgver=2.1
pkgrel=1
pkgdesc='BitTorrent client for GNOME'
arch=('loong64' 'x86_64')
url='https://gitlab.gnome.org/World/Fragments'
license=('GPL3')
depends=('libadwaita' 'transmission-cli')
makedepends=('git' 'meson' 'rust')
_commit=7d94fd0107df498139817842a2b4b22103640c61
source=("git+https://gitlab.gnome.org/World/Fragments.git#commit=$_commit")
sha256sums=('SKIP')
options=(!lto)

pkgver() {
  cd Fragments
  git describe --tags | sed 's/-/+/g'
}

build() {
  arch-meson Fragments build
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  DESTDIR="$pkgdir" meson install -C build
}
